home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
mymenv-notify 2.0
/
Readme
< prev
next >
Wrap
Text File
|
1996-06-09
|
3KB
|
66 lines
What: utility C++ functions/classes for a few very common Mac chores
Highlights:
- posting synchronous _and_ asynchronous notifications
- printf() in an alert box
- "magic" conversion from a C to Pascal string
- do_well() macro to make sure a "system call" went well
- handling of mandatory Apple Events: OpenApplication, {Open|Print}Document, Quit:
registering C++ classes as recipients of AppleEvents
- with the complete source and comments/explanations
Keywords: notification, AppleEvent, utility, registration, programming support, environment
Contents:
Readme - this file
libmac.a - library (compiled for a PowerMac)
libmac.pi - CW9 project to build it
mymenv.h - interfaces of the utility classes
mymenv.cc - implementation code
notify.cc
vmymenv.cc - verification code
vservice++.pi - project to run it
myAEvents.h - a simple code to handle the mandatory AppleEvents
myAEvents.cc
vmyAEvents.cc - verification code to test Open{Application|OpenDocument(s)}
vmyAEvents.π and Quit events
vmyAEvents.π.rsrc
Note: The environment is used in most of my Mac software (incl. the one submitted to the Info-Mac)
Language: C++, CodeWarrior9
System: System 7.1 - 7.5.3, binaries are made for a PowerMac.
Comments to: oleg@ponder.csci.unt.edu, oleg@unt.edu
Version 2.0, June 1996
New in version 2.0
- renamed myenv.* into mymenv.* to avoid name conflicts with my (UNIX)
C++ environment
- renamed message()/_error() into alert()/_die() for the same reason: the former
(declared in my advanced C++ i/o package) write into a SIOUX console; the latter
functions display an alert.
- "magic" conversion from C to Pascal string
- Handling of Mandatory Apple Events OpenApplication, {Open|Print}Document, Quit
- Now works under CW9 (the previous version was compiled with Symantec C++ 6.0)
Explanation:
notify.c: The set of functions lets a (possibly, background) application post
synchronous or asynchronous notification messages to the user.
Synchronous posting means that the posting function does not return until
the notification message is displayed and the user dismisses it.
In asynchronous mode, the posting function returns as soon as the
message is queued into the notification queue (but not yet displayed!).
The functions use the Notification Manager and the EventManager (via
function sleep() defined elsewhere in the standard env to relinquish
the CPU control while sleeping). Circular queue is used to store
asynchronous notification requests.
"magic" conversion from C to Pascal string: see
http://mozart.compsci.com/~oleg/ftp/c++-digest/type_conv_magic.txt
ftp://replicant.csci.unt.edu/pub/oleg/c++-digest/type_conv_magic.txt
Handling of AppleEvents: uses a trick to relay AppleEvents to (abstract) C++ classes
for processing
If you need further information or details, please mail me. If you want to see more
functionality added, mail me too.